package com.lagou.edu.mvcframework.pojo;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

/**
 * @Description: 功能描述
 * @Author houjh
 * @Email: happyxiaohou@gmail.com
 * @Date: 2021-6-1 23:43
 */
public class HandlerMapping {
    private Object controller;

    private Method method;

    private Pattern url;

    //参数信息 key表示的是参数的名称 value表示的是参数的位置信息
    private Map<String,Integer> paramInfo = new HashMap<>();

    public HandlerMapping(Object controller, Method method, Pattern url) {
        this.controller = controller;
        this.method = method;
        this.url = url;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getUrl() {
        return url;
    }

    public void setUrl(Pattern url) {
        this.url = url;
    }

    public Map<String, Integer> getParamInfo() {
        return paramInfo;
    }

    public void setParamInfo(Map<String, Integer> paramInfo) {
        this.paramInfo = paramInfo;
    }
}
